import { Link, useNavigate } from "react-router-dom"

const Login = () => {
    const navigate = useNavigate()
    return (
        <div className="flex flex-column">
            <div>我是登录</div>
            {/* 申明式写法 */}
            <Link to={'/article'}>登录</Link>
            {/* 命令式写法 */}
            <div>
                <button onClick={() => {navigate('/article?id=12')}}>登录</button>
            </div>
            <div>
                <button onClick={() => {navigate('/my/100')}}>登录</button>
            </div>
        </div>
    )
}

export default Login